package iscte.iul.dcti.pa2013_14;
import iscte.iul.dcti.pa2013_14.sqlib.*;


public class Main {

	public static void main(String[] args) {
		SQLGenerator gen = new SQLGenerator(new OracleSQLGenerator());
		
		System.out.println(gen.createTableInstruction(Employee.class));
	
		
		gen.setMapper(new MySQLGenerator());
		
		System.out.println(gen.createTableInstruction(Employee.class));
		
		Employee e1 = new Employee(1, "Mourinho");
		Employee e2 = new Employee(7, "Cristiano", e1);
		Project p = new Project("testproj", 2);
		
//		System.out.println(gen.createInsertStatement(e1));
//		System.out.println(gen.createInsertStatement(e2));
//		System.out.println(gen.createInsertStatement(p));
//		
//		Class<?> c = Employee.class;
//		
//		System.out.println(c.getName());
//		for(Field f : c.getDeclaredFields()) {
//			f.setAccessible(true);
//			try {
//				System.out.println("\t" +  f.getName() + " : " + f.get(e1));
//			} catch (IllegalArgumentException e) {
//				e.printStackTrace();
//			} catch (IllegalAccessException e) {
//				e.printStackTrace();
//			}
//		}
		
		
	}

}
